<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/public_header_main.jsp"%>
<link rel="stylesheet" href="${ctx_static }/home/configuration/css/activityManager.css">
<body>
<div class="page-container">
	<div class="page-body">
		<div class="row">
			<div class="col-lg-12 col-sm-12 col-xs-12">
				<div class="row">
					<div class="col-lg-12 col-sm-12 col-xs-12">
						<div class="widget">
							<div class="widget-body">
								<div class="widget-main ">
									<div class="tabbable">
										<ul class="nav nav-tabs tabs-flat">
											<li class="active"><a data-toggle="tab" href="#promoCode">优惠码</a></li>
											<li><a data-toggle="tab" href="#salesPromotion">促销活动</a></li>
										</ul>
										<div class="tab-content tabs-flat bordered-blue">
											<div id="promoCode" class="tab-pane in active">
												<div class="row row_padding form-horizontal">
													<div class="col-md-6 col-sm-6 col-xs-12">
														<div
															class="form-group col-lg-6 col-md-6 col-sm-8 no-margin-right">
															<select id="status" name="status" class="form-control">
																<option value="">状态</option>
																<option value="0">未使用</option>
																<option value="1">已使用</option>
															</select>
														</div>
														<div class="form-group col-lg-2 col-md-4 col-sm-4">
															<a type="button" class="btn btn-blue form-control search-btn" href="javascript:yhmDataTable.init();">
																搜索</a>

														</div>
													</div>


													<div
														class="col-lg-3 col-md-4 col-sm-5 col-lg-offset-3 col-md-offset-2 col-xs-12 btn-group">
														<span class="btn btn-default pointer"
															title="View print view"><span>打印</span></span>
														<div class="btn-group">
															<button type="button"
																class="btn btn-default dropdown-toggle"
																data-toggle="dropdown">
																导出 <i class="fa fa-angle-up"></i>
															</button>
															<ul class="dropdown-menu" role="menu">
																<li><a href="#">保存PDF</a></li>
																<li><a href="#">导出EXCEL</a></li>
																<li><a href="#">导出CSV</a></li>
															</ul>
														</div>
														<button class="btn increase pull-right col-sm-4"
															data-toggle="modal" data-target=".promoCodeAdd"
															data-backdrop="static">
															新增 <i class="fa fa-plus-square-o right"></i>
														</button>
													</div>
												</div>
												<table id="youHuiCode" class="table table-striped table-hover table-bordered dataTable no-footer">
													<thead>
														<tr role="row">
															<th width="5%"><label> <input
																	type="checkbox"> <span class="text"></span>
															</label></th>
															<th>优惠码 
															</th>
															<th>使用起止日期</th>
															<th>状态
															</th>
															<th>金额 
															</th>
															<th>使用时间 
															</th>
															<th>使用人
															</th>
														</tr>
													</thead>
												</table>
											</div>
											<div id="salesPromotion" class="tab-pane">
												<div class="row row_padding form-horizontal">
													<div class="col-md-3 col-sm-3 col-xs-12">
														<div class="form-group">
															<label
																class="col-lg-2 col-md-3 col-sm-3 control-label no-padding-right">日期</label>
															<div class="col-lg-10 col-md-9 col-sm-9">
																<div class="controls">
																	<div class="input-group date">
																		<input type="text" class="form-control"
																			id="duration1"> <span
																			class="input-group-addon"><i
																			class="fa fa-calendar"></i></span>
																	</div>
																</div>
															</div>
														</div>
													</div>

													<div class="col-md-6 col-sm-6 col-xs-12">
														<div class="form-group col-md-6 col-sm-4 no-margin-right">
															<input type="text" class="form-control"
																placeholder="标题/项目名称" id="searchVal" name="searchVal" onkeydown="search();">
														</div>
														<div
															class="form-group col-lg-4 col-md-4 col-sm-4 no-margin-right">
															<select class="form-control" name="status" id="enable">
																<option value="">状态</option>
																<option value="0">禁用</option>
																<option value="1">启用</option>
															</select>

														</div>
														<div class="form-group col-lg-2 col-md-3 col-sm-4">
															<!-- <button type="button"
																class="btn btn-blue form-control search-btn">
																搜索</button> -->
															<a type="button" class="btn btn-blue form-control search-btn" href="javascript:cxDataTable.init();">
																搜索</a>
														</div>
													</div>


													<div class="col-md-3 col-sm-3 col-xs-12 btn-group">
														<span class="btn btn-default pointer"
															title="View print view"><span>打印</span></span>
														<div class="btn-group">
															<button type="button"
																class="btn btn-default dropdown-toggle"
																data-toggle="dropdown">
																导出 <i class="fa fa-angle-up"></i>
															</button>
															<ul class="dropdown-menu" role="menu">
																<li><a href="#">保存PDF</a></li>
																<li><a href="#">导出EXCEL</a></li>
																<li><a href="#">导出CSV</a></li>
															</ul>
														</div>
														<button class="btn increase pull-right col-sm-4"
															data-toggle="modal" data-target=".salesPromotionAdd"
															data-backdrop="static">
															新增 <i class="fa fa-plus-square-o right"></i>
														</button>
													</div>
												</div>

												<table id="cuXiao" class="table table-striped table-hover table-bordered dataTable no-footer">
													<thead>
														<tr role="row">
															<th width="5%"><label> <input
																	type="checkbox"> <span class="text"></span>
															</label></th>
															<th>标题 
															</th>
															<th>项目名称 
															</th>
															<th>开始日期 
															</th>
															<th>结束日期 
															</th>
															<th>折扣 
															</th>
															<th>类型 
															</th>
															<th>状态 
															</th>
															<th>操作</th>
														</tr>
													</thead>
												</table>
											</div>
										</div>
									</div>
								</div>
							</div>
							<!--Widget-->
						</div>
					</div>

				</div>
			</div>
		</div>
	</div>
</div>

<!--新增优惠码-->
<div class="modal fade promoCodeAdd" tabindex="-1" role="dialog"
	aria-labelledby="mySmallModalLabel" aria-hidden="true">
	<div class="modal-dialog modal-sm">
		<div class="modal-content youhuima">
			<div class="modal-header bordered-blue">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
				</button>
				<span class="widget-caption">新增</span>
			</div>
			<div class="modal-body">
				<form class="form-horizontal" id="promoCodeAdd" method="post">
					<div class="form-group">
						<label class="control-label col-sm-3 no-padding-right">金额</label>
						<div class="col-sm-8">
							<div class="input-group">
								<input type="text" class="form-control amount" id="amount" name="amount"> <span
									class="input-group-addon">元</span>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-3 no-padding-right">数量</label>
						<div class="col-sm-8">
							<input type="text" class="form-control num" id="num" name="num">
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-3 no-padding-right">起止日期</label>
						<div class="col-sm-8">
							<div class="input-group date">
								<input type="text" class="form-control duration" id="duration" name="duration">
								<span class="input-group-addon"><i
									class="fa fa-calendar"></i></span>
							</div>
						</div>
					</div>
					<div class="form-group modal-footer">
						<div class="col-sm-4 col-sm-offset-3">
							<button type="submit" class="btn btn-primary form-control">生成优惠码</button>
						</div>
						<div class="col-sm-4">
							<button type="button" class="btn btn-danger form-control"
								data-dismiss="modal">取消</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>

<!--新增促销活动-->
<div class="modal fade salesPromotionAdd" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel"
     aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content cuXiao">
            <div class="modal-header bordered-blue">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
                        class="sr-only">Close</span></button>
                <span class="widget-caption" id="myModalLabel">新增</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="salesPromotionAdd" method="post">
                    <div class="form-group col-sm-6">
                        <label class="control-label col-sm-3 no-padding-right">标题</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control title" name="title" id="title">
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="control-label col-sm-3 no-padding-right">所属项目</label>
                        <div class="col-sm-9">
                            <select class="form-control project" name="project">
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-sm-6 activityType">
                        <label class="control-label col-sm-3 no-padding-right">类型</label>
                        <div class="col-sm-9">
                            <select name="type" class="form-control type" id="activityAdd">
                                <option value="0">--请选择--</option>
                                <option value="1">报名折扣</option>
                                <option value="2">满额返券</option>
                                <option value="3">优惠码</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-sm-6 overlay">
                        <label class="control-label col-sm-3 no-padding-right">可叠加优惠</label>
                        <div class="col-sm-9">
                            <select name="isMulti" class="form-control isMulti" id="overlayAdd">
                                <option value="0">--请选择--</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-sm-6 discount">
                        <label class="control-label col-sm-3 no-padding-right">折扣</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control discountAdd" name="discountAdd">
                        </div>
                    </div>
                    <div class="form-group col-sm-6 lowerLimit1">
                        <label class="control-label col-sm-3 no-padding-right">下限(1)</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control limit1" name="limit1">
                        </div>
                    </div>
                    <div class="form-group col-sm-6 lowerLimit2">
                        <label class="control-label col-sm-3 no-padding-right">下限(2)</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control limit2" name="limit2">
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="control-label col-sm-3 no-padding-right">起止日期</label>
                        <div class="col-sm-9">
                            <div class="input-group date">
                                <input type="text" class="form-control duration3" id="duration3" name="duration3">
                                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="control-label col-sm-3 no-padding-right">状态</label>
                        <div class="col-sm-9">
                            <select name="enable" class="form-control enable">
                                <option value="1">启用</option>
                                <option value="0">禁用</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label class="control-label col-sm-2 no-padding-right remarkText">备注</label>
                        <div class="col-sm-10 remarkContent">
                            <textarea class="form-control description" rows="8" name="description"></textarea>
                        </div>
                    </div>
                    <div class="form-group modal-footer">
                        <div class="col-sm-2 col-sm-offset-4">
                        	<button type="submit" class="btn btn-primary form-control">确定</button>
                        </div>
                        <div class="col-sm-2">
                            <button type="button" class="btn btn-danger form-control" data-dismiss="modal">取消</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<!--查看-->
<div class="modal fade salesPromotionView" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel"
     aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header bordered-blue">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
                        class="sr-only">Close</span></button>
                <span class="widget-caption">查看</span>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="salesPromotionView">
                    <div class="form-group col-sm-6">
                        <label class="control-label col-sm-3 no-padding-right">标题</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control title" value="" id="titleView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="control-label col-sm-3 no-padding-right">所属项目</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="projectView" value="" disabled>
                        </div>
                    </div>
                    <div class="form-group col-sm-6 activityType">
                        <label class="control-label col-sm-3 no-padding-right">类型</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="typeView" value="" disabled>
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="control-label col-sm-3 no-padding-right">可叠加优惠</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="isMultiView" value="" disabled>
                        </div>
                    </div>
                    <div class="form-group col-sm-6 discount">
                        <label class="control-label col-sm-3 no-padding-right">折扣</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" value="" id="discountView" name="discount" disabled>
                        </div>
                    </div>
                    <div class="form-group col-sm-6 lowerLimit1">
                        <label class="control-label col-sm-3 no-padding-right">下限(1)</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" value="" id="limit1View" name="lowerLimit1" disabled>
                        </div>
                    </div>
                    <div class="form-group col-sm-6 lowerLimit2">
                        <label class="control-label col-sm-3 no-padding-right">下限(2)</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" value="" id="limit2View" name="lowerLimit2" disabled>
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="control-label col-sm-3 no-padding-right">起止日期</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" value="" id="beginAndEnd" disabled>
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="control-label col-sm-3 no-padding-right">状态</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="enableView" value="" disabled>
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label class="control-label col-sm-2 no-padding-right remarkText">备注</label>
                        <div class="col-sm-10 remarkContent">
                            <textarea class="form-control" rows="8" id="descriptionView" disabled></textarea>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<!--编辑-->
<div class="modal fade salesPromotionEdit" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel"
     aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header bordered-blue">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
                        class="sr-only">Close</span></button>
                <span class="widget-caption">编辑</span>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="salesPromotionEdit" method="post">
                    <div class="form-group col-sm-6">
                        <label class="control-label col-sm-3 no-padding-right">标题</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" value="" id="titleUpdt" name="title">
                            <input hidden id="activityId" name="activityId" ></input>
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="control-label col-sm-3 no-padding-right">所属项目</label>
                        <div class="col-sm-9">
                            <select id="projectUpdt" name="project" class="form-control">
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-sm-6 activityType">
                        <label class="control-label col-sm-3 no-padding-right">类型</label>
                        <div class="col-sm-9">
                            <select name="activityType" class="form-control" id="activityEdit">
                                <option value="1">报名折扣</option>
                                <option value="2">满额返券</option>
                                <option value="3">优惠码</option>  
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-sm-6 overlay">
                        <label class="control-label col-sm-3 no-padding-right">可叠加优惠</label>
                        <div class="col-sm-9">
                            <select name="overlay" class="form-control" id ="overlayEdit">
                            	<option value="0" >独立</option>
                            	<option value="1" >优惠码</option>
                            	<option value="2" >报名折扣</option>
                            	<option value="3" >满额返券</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-sm-6 discount">
                        <label class="control-label col-sm-3 no-padding-right">折扣</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" value="" name="discount" id="discountUpdt">
                        </div>
                    </div>
                    <div class="form-group col-sm-6 lowerLimit1">
                        <label class="control-label col-sm-3 no-padding-right">下限(1)</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" value="" name="lowerLimit1" id="lowerLimit1">
                        </div>
                    </div>
                    <div class="form-group col-sm-6 lowerLimit2">
                        <label class="control-label col-sm-3 no-padding-right">下限(2)</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" value="" name="lowerLimit2" id="lowerLimit2">
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="control-label col-sm-3 no-padding-right">起止日期</label>
                        <div class="col-sm-9">
                            <div class="input-group date">
                                <input type="text" class="form-control" id="duration2" value="" name="duration2">
                                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="control-label col-sm-3 no-padding-right">状态</label>
                        <div class="col-sm-9">
                            <select id="enableUpdt" name="enable" class="form-control">
                                <option value="0">启用</option>
                                <option value="1">禁用</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label class="control-label col-sm-2 no-padding-right remarkText">备注</label>
                        <div class="col-sm-10 remarkContent">
                            <textarea class="form-control" rows="8" id="descriptionUpdt" name="description"></textarea>
                        </div>
                    </div>
                    <div class="form-group modal-footer">
                        <div class="col-sm-2 col-sm-offset-4">
                            <button type="submit" class="btn btn-primary form-control">确定</button>
                        </div>
                        <div class="col-sm-2">
                            <button type="button" class="btn btn-danger form-control" data-dismiss="modal">取消</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script src="${ctx_static }/home/configuration/js/activityManager.js"></script>

</body>
